<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改上班人数管理')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-yuangongTest-edit" th:object="${yuangong}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="date" th:value="${#dates.format(yuangong.date, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">仓库：</label>
                <div class="col-sm-8">
                    <select name="dianming" id="dianming" class="form-control"
                            th:with="type=${@cangkuServiceImpl.selectCangkuAll()}" required>
                        <option th:each="lists : ${type}"
                                th:text="${lists.getCangkuName()}"
                                th:if="${lists.getCangkuName().equals(session.name4user)
                                        || session.QuanXian=='1'||session.QuanXian==1}"
                                th:value="${lists.getCangkuName()}"
                                th:field="*{dianming}"></option>
                    </select>
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">上班人数：</label>
                <div class="col-sm-8">
                    <input name="renshu" th:field="*{renshu}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="beizhu" th:field="*{beizhu}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "yuangong/yuangongTest";
        $("#form-yuangongTest-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-yuangongTest-edit').serialize());
            }
        }

        $("input[name='date']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>